package defense_against_all;

import java.awt.Image;
import java.awt.Rectangle;

import javax.swing.ImageIcon;

public class Enemy_Ground {
	Image img;
	int x, y;
	boolean isAlive = true;
	public Enemy_Ground(int startX, int startY, String enemyFile){
		x= startX;
		y = startY;
		
		ImageIcon ic = new ImageIcon(enemyFile);
		img = ic.getImage();
	}
	public Rectangle getBounds(){
		return new Rectangle(x,y,100,49);
	}
	public void move(int dx, int left){
		if(dx == 1 && !((left+dx)<150))
			x = x-dx;
	}
	public int getX(){
		return x;
	}
	public int getY(){
		return y;
	}
	public boolean Alive(){
		return isAlive;
	}
	public Image getImage(){
		return img;
	}
}
